package com.nannybear.Model;

import com.nannybear.MainActivity;

/**
 * @brief To transmit the change of humidity.
 */
public class HumidityChange implements Command {
    /**
     * ******* DECLARATIONS *********
     */
    private MainActivity activity;

    /************ METHODS ************/
    /**
     * @brief Constructor.
     */
    public HumidityChange(MainActivity activity) {
        this.activity = activity;
    }

    /**
     * @brief Execution of the humidity change
     */
    public void execute(String data) {
        this.activity.getHumidity().changeHumidity(Integer.parseInt(data));
    }
}